Skip to main content
Version: 4.4

Send Requests to Endpoint

Deploy model from Katonic Platform

To Send the request to Endpoint the user needs to deploy the model first.

To deploy the model, the user needs to go to the deployment section of the platform and follow the below steps:

  • log-in to Katonic Platform and navigate to Deployment

  • Click on Model Deployment

  • Provide name of the deployment

  • Select Custom Model as deployment type

  • Provide the GitHub token

  • Your username will appear once the token is passed

  • Select the account type

  • Select the branch name

  • Select Python version

  • Select model type

  • Select pods range

  • Select resources

  • Click on Deploy.

  • Once your Custom Model API is created you will be able to view it in the Deploy section where it will be in "Processing" state in the beginning. Click on refresh to update the status. Keep checking the logs, to see the current status of deployment.

  • You can also check out the logs to see the progress of the deployment using Logs option.

  • Once your Model API is in the Running state you can check consumption of the hardware resources from Usage option.

  • You can access the API endpoints by clicking on API.

There are two APIs under API URLs:

Model Prediction API endpoint:

This API is for generating the prediction from the deployed model Here is the code snippet to use the predict API:

MODEL_API_ENDPOINT= "Prediction API URL"
SECURE_TOKEN="Token"
data = {"data":"Define the value format as per the schema file"}
result = requests.post(f"{MODEL_API_ENDPOINT}", json = data,verify=False, headers = {"Authorization":SECURE_TOKEN})
print(result.text)

Model Feedback API endpoint:

This API is for monitoring the model performance once you have the true labels available for the data. Here is the code snippet to use the feedabck API. The predicted labels can be saved at the destination sources and once the true labels are available those can be passed to the feedback URL to monitor the model continuously.

   MODEL_FEEDBACK_ENDPOINT= "Feedback API URL"
   SECURE_TOKEN="Token"
   true = "Pass the list of true labels"
   pred = "Pass the list of predicted labels"
   data = {"true_label":true,"predicted_label":pred}
   result = requests.post(f"{MODEL_API_ENDPOINT}", json = data,verify=False, headers = {"Authorization":SECURE_TOKEN})
   print(result.text)